<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>爱心动画</title>
    <style>
        body {
            margin: 0;
            padding: 0;
            overflow: hidden;
            background-color: #000;
            display: flex;
            justify-content: center;
            align-items: center;
            height: 100vh;
            font-family: Arial, sans-serif;
        }
        
        .love-text {
            position: absolute;
            font-size: 5rem;
            font-weight: bold;
            color: #7ec0ee;
            text-shadow: 0 0 10px #7ec0ee, 0 0 20px #7ec0ee;
            opacity: 0;
            animation: fadeIn 2s forwards 1s, pulse 2s infinite 3s;
            z-index: 10;
        }
        
        @keyframes fadeIn {
            from { opacity: 0; transform: scale(0.5); }
            to { opacity: 1; transform: scale(1); }
        }
        
        @keyframes pulse {
            0% { transform: scale(1); }
            50% { transform: scale(1.1); }
            100% { transform: scale(1); }
        }
        
        .heart {
            position: absolute;
            pointer-events: none;
            animation: float 6s ease-in-out infinite, fade 4s ease-in infinite;
        }
        
        @keyframes float {
            0%, 100% { transform: translateY(0) rotate(0deg); }
            50% { transform: translateY(-20px) rotate(5deg); }
        }
        
        @keyframes fade {
            0%, 100% { opacity: 0.2; }
            50% { opacity: 1; }
        }
    </style>
</head>
<body>
    <div class="love-text">I LOVE U</div>
    
    <script>
        document.addEventListener('DOMContentLoaded', function() {
            createHearts();
        });
        
        function createHearts() {
            const colors = ['#ff9ff3', '#feca57', '#ff6b6b', '#48dbfb', '#1dd1a1'];
            const count = 100;
            
            for (let i = 0; i < count; i++) {
                const heart = document.createElement('div');
                heart.className = 'heart';
                heart.innerHTML = '❤️';
                
                // 随机位置
                const x = Math.random() * window.innerWidth;
                const y = Math.random() * window.innerHeight;
                
                // 随机大小
                const size = Math.random() * 2 + 1;
                
                // 随机颜色 - 主要使用粉色系
                const colorIndex = Math.floor(Math.random() * 2); // 主要从粉色中选择
                const color = colorIndex === 0 ? '#ff9ff3' : '#ff6b6b';
                
                // 随机动画延迟
                const delay = Math.random() * 5;
                const duration = 3 + Math.random() * 4;
                
                heart.style.left = `${x}px`;
                heart.style.top = `${y}px`;
                heart.style.fontSize = `${size}rem`;
                heart.style.color = color;
                heart.style.animationDelay = `${delay}s`;
                heart.style.animationDuration = `${duration}s`;
                
                document.body.appendChild(heart);
            }
        }
    </script>
</body>
</html>